﻿using System;
using System.Data;
using System.Collections.Generic;

namespace WinFormClient
{
    public class MethodCollection
    {
        List<Method> _list = new List<Method>();

        public void Add(Method method)
        {
            this._list.Add(method);
        }

        public void Add(string returnType, string methodName, string statementName, string parameterType, string parameterName, DataAccessMethod accessMethod)
        {
            this._list.Add(new Method(returnType, methodName, statementName, parameterType, parameterName, accessMethod));
        }

        public int Count { get { return this._list.Count; } }

        public Method this[int index]
        {
            get
            {
                return this._list[index];
            }
        }

        public void Dispose()
        {
            this._list.Clear();
        }
    }
}
